#!/bin/bash -e

umask 2

if ! whoami &>/dev/null; then
  echo "${USER:-default}:x:$(id -u):$(id -g):Default User:$HOME:/sbin/nologin" >>/etc/passwd
fi

if [[ $# -eq 0 ]]; then
  exec /bin/bash
else
  exec "$@"
fi
